-- GENERATED SPELL FOR [Bloodwarder Physician] --


function spell0_20990(pUnit, Event) --@Anesthetic,n/a--
pUnit:FullCastSpellOnTarget(36333,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20990', 7000, 1)
end

function spell1_20990(pUnit, Event) --@Bandage,Heal--
pUnit:FullCastSpellOnTarget(36348,pUnit)
pUnit:RegisterEvent('Sorts_20990', 8000, 1)
end

function spell2_20990(pUnit, Event) --@Bandage,Heal--
pUnit:FullCastSpellOnTarget(38919,pUnit)
pUnit:RegisterEvent('Sorts_20990', 8000, 1)
end

function spell3_20990(pUnit, Event) --@Holy Shock,n/a--
pUnit:FullCastSpellOnTarget(36340,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20990', 586, 1)
end

function spell4_20990(pUnit, Event) --@Holy Shock,n/a--
pUnit:FullCastSpellOnTarget(38921,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20990', 622, 1)
end

function Sorts_20990(pUnit, Event)
local choix_sorts_20990 = math.random(0, 4)
if choix_sorts_20990 == 0 then
pUnit:RegisterEvent('spell0_20990', 1, 1)
end
if choix_sorts_20990 == 1 then
pUnit:RegisterEvent('spell1_20990', 1, 1)
end
if choix_sorts_20990 == 2 then
pUnit:RegisterEvent('spell2_20990', 1, 1)
end
if choix_sorts_20990 == 3 then
pUnit:RegisterEvent('spell3_20990', 1, 1)
end
if choix_sorts_20990 == 4 then
pUnit:RegisterEvent('spell4_20990', 1, 1)
end
end

function mob20990_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20990', math.random(1500, 3000), 1)
end

function mob20990_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20990_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20990_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20990, 1, 'mob20990_Action')
RegisterUnitEvent(20990, 2, 'mob20990_Leave')
RegisterUnitEvent(20990, 3, 'mob20990_Kill')
RegisterUnitEvent(20990, 4, 'mob20990_Die')
